package day07;

/**
 * @author Xiao
 * @date 2021/7/8
 */
public class Teacher {
    /**
     *      需求：
     *      请定义教师类（Teacher），属性包括姓名(name)和工号(id)，
     *      定义教课（teach）方法，输出“工号为xxx的xxx老师正在讲课”。
     */
    private String name;
    private String id;
    public void teach () {
        System.out.println("工号为：" + this.id + "的" + this.name + "老师正在讲课。");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Teacher(String name, String id) {

        this.name = name;
        this.id = id;
    }

    public Teacher() {

    }
}
